home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1999 March / EnigmA AMIGA RUN 35 (1999)(G.R. Edizioni)(IT)[!][issue 1999-03].iso / earcd / devel / vbcc-ppc / doc / vbccc16x.doc < prev    next >
Text File  |  1999-01-01  |  3KB  |  100 lines

  1. vbcc - C compiler (c) in 1995-99 by Volker Barthelmann
  2.  
  3.  
  4. INTRODUCTION
  5.  
  6.     vbcc is a free portable and retargetable ANSI C compiler.
  7.     It is clearly split into a target independant and a target dependant
  8.     part and supports emulating datatypes of the target machine on any
  9.     other machine so that it is possible to e.g. make a crosscompiler for
  10.     a 64bit machine on a 32bit machine.
  11.     This document only deals with the target dependant parts of the
  12.     SAB c16x version.
  13.  
  14.     This is a pre-alpha version!
  15.  
  16.  
  17. LEGAL
  18.  
  19.     vbcc is (c) in 1995-99 by Volker Barthelmann. All code is written by me
  20.     and may be freely redistributed as long as no modifications are made
  21.     and nothing is charged for it.
  22.     Non-commercial usage of vbcc is allowed without any restrictions.
  23.     Commercial usage needs my written consent.
  24.  
  25.     Sending me money, gifts, postcards etc. would of course be very nice
  26.     and may encourage further development of vbcc, but is not legally or
  27.     morally necessary to use vbcc.
  28.  
  29.  
  30. ADDITIONAL OPTIONS FOR THIS VERSION
  31.  
  32.     -merge-constants
  33.  
  34.                 Place identical floating point constants at the same
  35.                 memory location. This can reduce program size and increase
  36.                 compilation time.
  37.  
  38.     -const-in-data
  39.  
  40.                 By default constant data will be placed in the code
  41.                 section (and therefore is accessable with faster pc-relative
  42.                 addressing modes). Using this option it will be placed in the
  43.                 data section.
  44.                 Note that on operating systems with memory protection this
  45.                 option will disable write-protection of constant data.
  46.  
  47.  
  48. SOME INTERNALS
  49.  
  50.     The current version generates assembly output for use with the Tasking
  51.     assembler using the small memory model. The generated code should work on
  52.     systems with c161, c163, c164, c165 and c167 microcontrollers. Old
  53.     versions like the c166 are not supported
  54.  
  55.  
  56.     The register names are:
  57.  
  58.         r0 through r15 for the general purpose registers and
  59.  
  60.     The registers r1-r5 and r10-r15 are used as scratch registers (i.e. they
  61.     can be destroyed in function calls), all other registers are preserved.
  62.  
  63.     r0 is used as user stack pointer. Automatic variables and temporaries
  64.     are put on the user stack. Return addresses are pushed on the system
  65.     stack.
  66.  
  67.     The first 4 function arguments which have integer or pointer types
  68.     are passed in registers r12 through r15.
  69.  
  70.     Integers and pointers are returned in r4.
  71.     All other types are returned by passing the function the address
  72.     of the result as a hidden argument - so when you call such a function
  73.     without a proper declaration in scope you can expect a crash.
  74.  
  75.     The elementary data types are represented like:
  76.  
  77.     type        size in bits        alignment in bytes
  78.  
  79.     char                8                       1
  80.     short              16                       2
  81.     int                16                       2
  82.     long                 currently not supported
  83.     all pointers       16                       2
  84.     float                currently not supported
  85.     double               currently not supported
  86.  
  87.  
  88. STDARG
  89.  
  90.     To be written...
  91.  
  92.  
  93. KNOWN PROBLEMS
  94.  
  95.     - lots...
  96.  
  97.  
  98. Volker Barthelmann                                      volker@vb.franken.de
  99.  
  100.